module.exports = [
  {
    name: 'egg-cors',
    npm: true,
    config: `
module.exports.security = {
  csrf: {
    enable: false,
  },
  domainWhiteList: ['*'],
};
module.exports.cors = {
  allowMethods: 'GET,HEAD,PUT,POST,DELETE,PATCH,OPTIONS',
  credentials: true,
  origin: '*',
};
`,
    plugin: [
      'cors',
      {
        enable: true,
        package: 'egg-cors',
      },
    ],
  },
  {
    name: 'egg-mongoose',
    npm: true,
    config: `
module.exports.mongoose = {
  url: 'mongodb://127.0.0.1:27017/{{db}}',
};
`,
    plugin: [
      'mongoose',
      {
        enable: true,
        package: 'egg-mongoose',
      },
    ],
  },
  {
    name: 'egg-redis',
    npm: true,
    config: `
module.exports.redis = {
  client: {
    port: 6379,
    host: '127.0.0.1',
    password: 'auth',
    db: 0,
  },
};
`,
    plugin: [
      'redis',
      {
        enable: true,
        package: 'egg-redis',
      },
    ],
  },
  {
    name: 'egg-router-plus',
    npm: true,
    config: '',
    plugin: [
      'routerPlus',
      {
        enable: true,
        package: 'egg-router-plus',
      },
    ],
  },
  {
    name: 'cluster',
    npm: false,
    config: `
module.exports.cluster = {
  listen: {
    path: '',
    port: {{port}},
  },
};
`,
    plugin: [],
  },
];
